package com.spd.tree;

/**
 * 树的节点定义，包含一个值，一个
 * @author xianchao
 *
 */
public class TreeNode {
	//值
	private int value;
	//左孩子
	private TreeNode left;
	//右孩子
	private TreeNode right;
	//双亲节点
	private TreeNode p;
	
	public TreeNode getP() {
		return p;
	}
	public void setP(TreeNode p) {
		this.p = p;
	}
	public int getValue() {
		return value;
	}
	public void setValue(int value) {
		this.value = value;
	}
	public TreeNode getLeft() {
		return left;
	}
	public void setLeft(TreeNode left) {
		this.left = left;
	}
	public TreeNode getRight() {
		return right;
	}
	public void setRight(TreeNode right) {
		this.right = right;
	}
	
}
